/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package refactoring;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.SocketAddress;
import static refactoring.Settings.ProxySettings.proxyAddress;

/**
 *
 * @author kvsevolo
 */
public class Settings {
    static final class ProxySettings {

        static final String proxyAddress = "www-proxy.ru.oracle.com";
        static final int proxyPort = 80;
        static Proxy proxy;

    }

    static final class SearchStrings {        

        final static String baseURL = "http://hymnal.net/hymn.php/h/";
        final static String searchStr1 = "https://www.hymnal.net/";
        final static String searchStr2 = "http://www.hymnal.net/Hymns/Hymnal/verbatim/e";
        final static String searchTuneStr1 = "/f=tune";
        final static String searchTuneStr1Post = "/f=tune";
    }
    
    public static Proxy getProxy(){
        
        if (ProxySettings.proxy == null) {
            SocketAddress addr = new InetSocketAddress(ProxySettings.proxyAddress, ProxySettings.proxyPort);
            ProxySettings.proxy = new Proxy(Proxy.Type.HTTP, addr);
        }

        return ProxySettings.proxy;
    }


}
